package sumit;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class InputReader 
{

	public static void main(String[] args) throws IOException 
	{
		Scanner scanner = new Scanner(System.in);
		
		System.out.println("enter a number");
		int temp = scanner.nextInt();
		System.out.println("the number is " + temp);
		
		System.out.println("enter a string");
		String input = scanner.next();
		System.out.println("the string is :" + input);
	
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
		System.out.println("enter a line of text");
		
		System.out.println(bufferedReader.readLine());
		
		/**
		 Instead of using buffered reader, 
		 i am using another scanner to print a line of text using nextLine() method 
		  
		**/
		
		Scanner sc = new Scanner(System.in);
		System.out.println("enter a line of text");
		String s = sc.nextLine();
		System.out.println("the statement is is :" + s);

		scanner.close();
		sc.close();
	}
}
